﻿# -*- coding:utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings

admin.autodiscover()

urlpatterns = patterns('',
    (r'^files/', include('homesite.files.urls')),
    #
    (r'^bugs/', include('homesite.bugs.urls')),
    #
    (r'^images/', include('homesite.images.urls')),
    
    (r'^house/', include('homesite.house.urls')),
    #
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^admin/', include(admin.site.urls)),
    #
    (r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'bugs/login.html'}),
    (r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'bugs/logout.html'}),   
    #
    (r'^main/', include('homesite.main.urls')),
    (r'^$', 'homesite.main.views.index'),
    
)

# for developer server
if settings.DEBUG:
    urlpatterns += patterns('',
        (r'media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'D:/srv/www/django/homesite/media'}),
    )